package edu.tamu.cse.teamproject1.Database.Interfaces;

import java.util.List;

import edu.tamu.cse.teamproject1.Database.Tuple;

/**
 * Describes a Tuple
 * 
 * This interface describes the minimal public methods necessary for a tuple - a
 * literal record row in our database. A tuple is comprised of multiple elements 
 * (columns, in essence), which contain all of the values. See {@link Tuple} for 
 * further details on Tuples. 
 * 
 * @author Christopher Weldon <chris@chrisweldon.net>
 * @since Release 0.1.0
 */
public interface ITuple extends Cloneable {
	/**     
	 * Retrieves a list of the elements (columns) complete with values
	 * 
	 * @return List<TupleElement> List of elements (columns) complete with values     
	 */
	List<ITupleElement> getAllElements();
	
	/**
	 * Adds a tuple element to the list of tuple elements
	 * 
	 * @param value Value of tuple element to add
	 */
	void addTupleElement(ITupleElement value);
	
	/**
	 * Adds a tuple element to the list of tuple elements
	 * 
	 * Size delimiter is used for object types such as varchar
	 * 
	 * @param value
	 * @param size
	 */
	void addTupleElement(Object value, int size);
	

	/**
	 * Deletes a tuple element based on a copy of the element itself
	 * 
	 * @param element
	 */
	void deleteTupleElement(Object element);
	
	/**
	 * Retrieves the unique id of the tuple
	 * 
	 * @return the unique id of the tuple
	 */
	long getUniqueId();
	
	/**
	 * Provides access to the cloneable methods
	 * 
	 * @return Copy of this tuple
	 */
	Object clone();
}
